﻿using UnityEngine;
using System.Collections;

public class Movement : MonoBehaviour {
	
	public CharacterController cc;
	public float moveSpeed;
	public float time;
	// Use this for initialization
	void Start () {
		cc = GetComponent<CharacterController>();
		
	
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetKey(KeyCode.UpArrow))
			cc.Move(Vector3.up * Time.deltaTime * moveSpeed);
		if(Input.GetKey(KeyCode.RightArrow))
			cc.Move(Vector3.right * Time.deltaTime * moveSpeed);
		if(Input.GetKey(KeyCode.LeftArrow))
			cc.Move(-Vector3.right * Time.deltaTime * moveSpeed);
		if(Input.GetKey(KeyCode.DownArrow))
			cc.Move(-Vector3.up * Time.deltaTime * moveSpeed);
			
		time = Time.deltaTime;
	
	}
}
